<template>
  <div>
    <el-dialog
      title="查看用户详情"
      :visible.sync="centerDialogVisibleUserDetail"
      :close-on-click-modal="false"
      width="40%"
      center
    >
      <el-form
        ref="ruleFormUserDetail"
        :model="ruleFormUserDetail"
        label-width="100px"
        class="demo-ruleForm"
      >
        <el-form-item label="用户名称:" prop="sysUserName">
          <el-input v-model="ruleFormUserDetail.sysUserName" :disabled="true" />
        </el-form-item>
        <el-form-item label="账号:" prop="sysUserLoginName">
          <el-input v-model="ruleFormUserDetail.sysUserLoginName" :disabled="true" />
        </el-form-item>
        <el-form-item label="账号登录次数" prop="sysLoginNumber">
          <el-input-number v-model="ruleFormUserDetail.sysLoginNumber" :min="-1" :disabled="true" @change="handleChange" />
        </el-form-item>
        <el-form-item label="手机号:" prop="sysUserPhone">
          <el-input v-model="ruleFormUserDetail.sysUserPhone" :disabled="true" />
        </el-form-item>
        <el-form-item prop="sysUserEmail" label="邮箱">
          <el-input v-model="ruleFormUserDetail.sysUserEmail" :disabled="true" />
        </el-form-item>
        <el-form-item label="状态" prop="isForbidden">
          <el-radio-group v-model="ruleFormUserDetail.isForbidden" :disabled="true">
            <el-radio label="0">已启用</el-radio>
            <el-radio label="1">已禁用</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>

export default {
  name: 'AuthUserDetail',
  props: {
    userDetail: {}
  },
  data() {
    return {
      centerDialogVisibleUserDetail: false,
      ruleFormUserDetail: {
        sysUserName: '',
        sysUserLoginName: '',
        sysUserPhone: '',
        sysUserEmail: '',
        sysLoginNumber: 1,
        isForbidden: '1',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      }
    }
  },
  watch: {
    userDetail: {
      deep: true,
      immediate: false,
      handler() {
        this.centerDialogVisibleUserDetail = this.userDetail.centerDialogVisibleUserDetail
        this.ruleFormUserDetail = this.userDetail.userInfo
      }
    }
  },
  methods: {
    handleChange(value) {
    }
  }
}
</script>

<style scoped>

</style>
